#include <stdio.h>

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> A;
  A.reserve(n);
  while (n--) {
    int x;
    cin >> x;
    A.push_back(x);
  }
  int target;
  cin >> target;
  vector<int>::iterator it = find(A.begin(),A.end(), target);
  int pos = (it == A.end() ? -1 : it - A.begin()+1);
  printf("%d\n", pos);
  return 0;
}